﻿#ifndef __PARSER_H__
#define __PARSER_H__

#include <memory>
#include <string>
#include <vector>

#include "Options.h"

#include "json.hpp"

class Parser
{
public:
    Parser();
    bool LoadJsonOptionsFromFile(const std::string& filepath);
    bool LoadJsonOptionsFromText(const std::string& json_text);

protected:
    bool ParseJsonOptions(const nlohmann::json& options);
    std::shared_ptr<Options> JsonToOptions(const nlohmann::json& json_options);
protected:
    std::shared_ptr<std::vector<std::shared_ptr<Options>>> m_net_options;
    std::shared_ptr<std::vector<std::string>> m_names;
};

#endif